package saeildamil.ch18.sync;

import javax.swing.JOptionPane;

public class CricleThread implements Runnable {
	int redius;
	SharedArea sharedArea;
	
	
	public CricleThread(int redius) {
		this.redius = redius;
	}
	
	@Override
	public void run() {
		getArea();
	}

	private void getArea() {
		while(sharedArea.isReady != true);
		double result = redius * redius * sharedArea.result;
		JOptionPane.showMessageDialog(null, "원의 넓이는" + result);
		
	}

}
